#include "FishFactory.h"
#include "Lockus.h"
#include "Buri.h"

class Fish;

Fish* FishFactory::createFish(const string& fishType) {
	FishImpl *fishImpl = NULL;
	if (fishType == "Buri") {
		fishImpl = new Buri();
	} else if (fishType == "Lockus") {
		fishImpl = new Lockus();
	} else {
		return NULL;
	}

	Fish *fish = new Fish(*fishImpl);
	return fish;
}

void FishFactory::destroyFish(Fish *fish) {
	delete fish->fishImpl;
	delete fish;
}